<template>
  <div>
    <my-lazy v-if="isShow"></my-lazy>
    <div class="ret" v-else="!isShow">
      <span class="iconfont icon-youjiantou2" @click="goback"></span>返回
      <div v-for="(item, i) in arr" class="photo">
        <img :src="item[0].url + '?token=' + item[0].token" alt="" />
      </div>
    </div>
  </div>
</template>
<style lang="scss">
.ret {
  position: absolute;
  top: 18px;
  left: 8px;
  z-index: 1000;
  span {
    font-size: 30px;
    color: #ccc;
  }
  .photo {
    position: relative;
    width: 100%;
    img {
      width: 100%;
      // height: 100%;
    }
  }
}
</style>
<script>
import lazyCom from "../components/lazyCom.vue";
export default {
  data() {
    return {
      arr: [],
      isShow: false,
    };
  },
  components: {
    "my-lazy": lazyCom,
  },
  methods: {
    goback() {
      this.isShow = true;
      this.$router.go(-1);
    },
  },
  created() {
    console.log(this.$route);
    this.arr = this.$route.query.dd;
  },
};
</script>